﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Site.Model;
using Site.Model.Entities;

namespace Site.mirfan00.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }

        public ActionResult About()
        {
            List<Post> lstPost = new List<Post>();
            Site_mirfan00Entities context = new Site_mirfan00Entities();

            lstPost = context.Posts.ToList();

            return View("About", lstPost);
        }
    }
}
